package org.game.log;

import org.game.log.builder.LogDsp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.sojoys.artifact.tools.SK_Plus;

/**
 * 游戏资源日志
 * Created by fxf on 2017/7/20.
 */
public class LogGoods implements IGameLogger {

	private LogGoods() {
	}

	private static LogGoods ME = new LogGoods();

	public static LogGoods me() {
		return ME;
	}
	
    private static Logger itemLogger = LoggerFactory.getLogger("item");
    
    
    public void log(int pid, int cid,int changeNum,int nowCount,LogDsp logDsp) {
    	SK_Plus sb = getPlayerInfo(pid);
    	addField(sb, cid);
    	addField(sb, changeNum);
    	addField(sb, nowCount);
    	addField(sb, logDsp.getDsp());
    	addField(sb, logDsp.build());
    	itemLogger.info(sb.e());
    }
}
